1. Field of the Invention
The present invention relates to a maximum value/minimum value extractor and method and, more particularly, to a circuit which receives a large amount of data serially, extracts a maximum value and/or minimum value from the large amount of data, and additionally identifies the address of the maximum value and/or minimum value.
2. Discussion of Related Art
A conventional maximum or minimum value extractor operates to obtain a maximum and/or minimum value by, first, comparing two data inputs using a comparator, and then extracting the larger (or smaller) value of the two data inputs. However, too many compare operations are needed for this conventional extractor. An example of the maximum/minimum value extracting operation among four data inputs A, B, C, D is illustrated in FIG. 1. First and second comparators are employed to compare two data inputs. A third comparator is employed to compare the outputs of the first and second comparators. These comparators obtain a maximum value by operating as follows. The larger of data inputs A and B compared by the first comparator is labelled MAX(A, B). The larger of data inputs C and D compared by the second comparator is labelled MAX(C, D). The larger of MAX(A, B) and MAX(C, D) compared by the third comparator is labelled MAX(A, B, C, D). The comparators also obtain the minimum value in a similar manner. The smaller of the two data inputs A and B, compared by the first comparator is named MIN(A, B). The smaller of the two data inputs C and D, compared by the second comparator is labelled MIN(C, D). The smaller of MIN(A, B) and MIN(C, D), compared by the third comparator, is labelled MIN(A, B, C, D).
FIG. 2 illustrates a conventional comparator structure, by Kai Hwang, "Computer Arithmetic: Principle, Architecture & Design".
In this circuit, two 4-bit data inputs A=A0A1A2A3 and B=B0B1B2B3 are compared to determine which is larger using the results of A&gt;B, B&gt;A, or A=B. That is, if A&gt;B is, the value of the A&gt;B output is "0" and another bit value becomes "0". If A&lt;B, the value of the A&lt;B output is "1", and another bit values are "0". In addition, if A=B, the output of the A=B is "1" and other bit value is "0".
In case of obtaining the maximum value using this conventional comparator, after the data is input, a considerably long time is required to compute the result. Moreover, because many comparators are employed to obtain the maximum and/or minimum values, the size of the chip is increased, and much time is needed to perform the many comparison operations.